|
|
- Robocode -- Building a robot
- So, again, let's start by building a simple robot
- Robot's the base class for all Robocode robots, so you'll extend Robot class like this:
public class BeginnerRobot extends Robot {
public run() {
while (true) {
ahead(100);
turnLeft(180);
)
}
}
It's pretty simple to start with
This moves the robot ahead 100, turns it around, and repeats
Note that the scanner is always on, so it scans wherever the robot is
|
|